﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<link href="data/responsiveslides.css" rel="stylesheet" type="text/css" />
<script src="data/responsiveslides.js" type="text/javascript"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <script type="text/javascript">
        
        function displayCalendar()
        {
            var datePicker = document.getElementById('datePicker');
            datePicker.style.display = 'block';
        }
        $(function () {
            $(".rslides").responsiveSlides({
         auto: true,
        pager: true
            });

        });

    </script>
<script type="text/javascript">


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}




</script>
 <style type="text/css">
        #datePicker
        {
            display:none;
            position:absolute;
            border:solid 2px black;
            background-color:white;
           
        }
    
    </style>
<style type="text/css">
html
{
  background-image:url('image/back.jpg'); 

    padding:10px;
    color:White;    
  
}
.content
{
    width:950px;
    margin:auto;
        height: 197px;
    }
a
{
 color: white;
 text-decoration:none;

}
a:hover
{
 color: red; 
  text-decoration:none;

}
.link
{
  margin-left:350px; 
     font-weight:bold;
  font-size:large;  
    font-size:x-large;
}
.link2
{
  margin-left:50px; 
     font-weight:bold;
  font-size:large;  
    font-size:x-large;
}
.join
{
   background-color:#0099FF;
  clip:auto;
  font-weight:bold;
  font-size:large;
}
.table2
{
 border-style:solid;
   border-color:Black;
   background-color:White;
   color:Black;  
   width:900px; 
}
.row
{
   background-color:Gray;
   color:White;
}
.ticket
{
   background-color:#CC0000;
color:White;

}

.ticket:hover
{
 color: black; 
  text-decoration:none;


}
    .style1
    {
        width: 509px;
    }
    
.footer
{

     font-weight:bold;
  font-size:large;  

}
.upcomingmovie:hover
{
 color: White; background-color:rgba(255,0,0,.75); 
}
.PriceList:hover
{
 color: White; background-color:rgba(255,0,0,.75); 
}
</style>
    <title>Home Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div class="content">

        <asp:Image ID="Image1" Width="1000" Height="130" ImageUrl="~/image/tdk-jun5-bannerbatmanexclusivo2.jpg" runat="server" />

<asp:HyperLink ID="HyperLink14"  CssClass="link" NavigateUrl="~/Default.aspx" runat="server">Home</asp:HyperLink>
<asp:HyperLink ID="HyperLink1"  CssClass="link2" NavigateUrl="~/Session.aspx" runat="server">Session</asp:HyperLink> <asp:HyperLink ID="HyperLink2" CssClass="link2" NavigateUrl="~/Movie.aspx" runat="server">Movies</asp:HyperLink>
<asp:HyperLink ID="HyperLink3" CssClass="link2"  NavigateUrl="~/Price.aspx" runat="server">Prices</asp:HyperLink>
<asp:HyperLink ID="HyperLink6" CssClass="link2"  NavigateUrl="~/register.aspx" runat="server">Register</asp:HyperLink>
 <br /> <br />
      
  
 <table >
 
 <tr><td><asp:Label ID="Label6" runat="server"  ForeColor="Yellow" Text="Buy Tickets For:" Font-Bold="True"></asp:Label>  </td> <td>  <asp:Menu
        id="menuTabs"
      StaticMenuItemStyle-BackColor="#333333" 
        StaticMenuItemStyle-Font-Size="Larger"
       DynamicHorizontalOffset="0"   
      DynamicHoverStyle-BackColor="#666666"
        DynamicMenuItemStyle-Width="150px"
       DynamicMenuItemStyle-BackColor="#333333" runat="server">
       <Items>
       <asp:MenuItem
       Text="Theatre" Selectable="False"  >
     <asp:MenuItem
       Text="Southwestcinema4"
   
        NavigateUrl="~/MovieCinema1.aspx" />
    <asp:MenuItem
      Text="RuralTwinCinemas"
     NavigateUrl="~/MovieCinema2.aspx" />
   </asp:MenuItem>
       </Items>
       </asp:Menu></td><td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp&nbsp;&nbsp &nbsp&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp&nbsp;&nbsp &nbsp&nbsp;&nbsp</td><td> <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp&nbsp;&nbsp &nbsp&nbsp;&nbsp 
    <asp:Label ID="Label5" runat="server" Text="UserName" Font-Bold="True"></asp:Label>    <asp:LoginName ID="LoginName1" runat="server" /> &nbsp;&nbsp;<asp:HyperLink ID="HyperLink15"  Font-Bold="True" Font-Underline="True" runat="server"  ForeColor="Yellow" />&nbsp;
    <asp:LoginStatus ID="LoginStatus1" runat="server" />
    
    </td>
<td></td>
</tr>
  </table>
   <br />
</asp:Label>
   <table style="width:100%">
   <tr><td style="width:630px">
<ul class="rslides">
  <li>  
  <asp:HyperLink
      ID="HyperLink11" Width="630" Height="300"  ImageUrl="~/image/640_skyfall_banner_jamesbond_sony.jpg"   NavigateUrl="~/Movie.aspx" runat="server" /></li>
  <li><asp:HyperLink ID="Image4" Width="630" Height="300" ImageUrl="~/image/dredd.jpg"  NavigateUrl="~/Movie.aspx"  runat="server" /></li>
   <li><asp:HyperLink ID="Image5" Width="630" Height="300" ImageUrl="~/image/taken2.jpg"  NavigateUrl="~/Movie.aspx"  runat="server" /></li>
    <li><asp:HyperLink ID="Image6" Width="630" Height="300" ImageUrl="~/image/The-Intouchables-French Movie Poster.jpg"   NavigateUrl="~/Movie.aspx"  runat="server" /></li>
</ul>
	
	</td><td align="center" >
 <asp:Image ID="Image2" Width="150" Height="150" ImageUrl="~/image/members-only1.jpg" runat="server" /><br />
        <asp:Label ID="Label1" runat="server" Text="MovieTix Membership" Font-Names="IMPACT" Font-Size="X-Large"></asp:Label><br /> Watch 10 movies get 1 free Movie<br /> 
        <asp:Label ID="Label2" runat="server" Text="Member login:" Font-Bold="True" Font-Size="Large"></asp:Label><br />
        <asp:HyperLink ID="HyperLink5" NavigateUrl="~/Login.aspx" CssClass="join" runat="server">Login</asp:HyperLink><br /> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Large" Text="Join MovieTix now:"></asp:Label><br />       <asp:HyperLink ID="HyperLink7" NavigateUrl="~/register.aspx" CssClass="join" runat="server">Register</asp:HyperLink><br />
        
                    </td></tr>
   
	</table>
<table class="table2">
<tr class="row" style="font-size: large; font-weight: 900;"><td class="style1">Upcoming movies</td><td>The prices</td></tr>
<tr><td class="style1" valign="top">
    <asp:GridView ID="GridView1" DataSourceID="SqlDataSource1"   
        BorderStyle="None"  runat="server"  HeaderStyle-BorderStyle="None" 
        AutoGenerateColumns="False" style="margin-top: 0px" Width="500px" >
        <Columns>
<asp:TemplateField  ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None" ControlStyle-BorderStyle="None"  >
 <HeaderTemplate>
 <tr style="border-style: none"><th>Title</th><th>Theatre</th><th>Information</th></tr>
 </HeaderTemplate>
<ItemTemplate>

<tr class="upcomingmovie"><Td  style="padding: 2px 18px 2px 18px;"><%#Eval("MovieTitle") %></Td><td style="padding: 2px 18px 2px 18px;"> <%#Eval("TheatreName") %></td><td style="padding: 2px 18px 2px 18px;"><asp:HyperLink ID="HyperLink4" NavigateUrl='<%#Eval("MovieId","Moviedetail.aspx?movie={0}")%>'  CssClass="ticket" runat="server">Info</asp:HyperLink></td> </tr>

</ItemTemplate>

</asp:TemplateField>
        </Columns>
    </asp:GridView>
  <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT Movie.MovieTitle,Movie.Movieid, Theatre.TheatreName FROM Movie INNER JOIN Theatre ON Movie.TheatreId = Theatre.TheatreId WHERE (Movie.Showing = @Showing)">
      <SelectParameters>
          <asp:Parameter DefaultValue="false" Name="Showing" Type="Boolean" />
      </SelectParameters>
    </asp:SqlDataSource>  
    
</td> <td> 
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:UpdatePanel runat="server">
  <ContentTemplate>    
      
<table>
 <tr ><td colspan="2" style="border-bottom-style: outset; border-bottom-width: 1px">   <asp:Label ID="Label7" runat="server" Text="+Please select a theatre:" 
        Font-Bold="True"></asp:Label>
    <asp:DropDownList ID="DropDownList1" AutoPostBack="true" DataTextField="TheatreName" DataValueField="TheatreID" DataSourceID="SqlDataSource4" runat="server">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT DISTINCT Cinema.TheatreId, Theatre.TheatreName FROM Cinema INNER JOIN Theatre ON Cinema.TheatreId = Theatre.TheatreId"></asp:SqlDataSource>
  
   <asp:Label ID="Label8" runat="server" Text="+Please select a cinema:" 
        Font-Bold="True"></asp:Label>  
<asp:DropDownList ID="DropDownList2" DataSourceID="SqlDataSource5" AutoPostBack="true" DataTextField="Cinemaid" DataValueField="Cinemaid" runat="server">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
         ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
         SelectCommand="SELECT DISTINCT [CinemaId] FROM [Cinema] WHERE ([TheatreId] = @TheatreId)">
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList1" Name="TheatreId" 
                PropertyName="SelectedValue" Type="Int16" />
        </SelectParameters>
     </asp:SqlDataSource>  </td></tr>
    
    
<tr><th>Normal Ticket</th><th>Special Ticket</th></tr>
<tr><td>
    <asp:GridView ID="GridView2" DataSourceID="SqlDataSource2" RowStyle-CssClass="PriceList"  runat="server">

    
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
        SelectCommand="SELECT TOP (5) TicketType, Price, cinema FROM TicketPrices WHERE (type = @type) AND (cinema = @cinema)">
        <SelectParameters>
            <asp:Parameter DefaultValue="Normal" Name="type" Type="String" />
            <asp:ControlParameter ControlID="DropDownList2" DefaultValue="" Name="cinema" 
                PropertyName="SelectedValue" />
        </SelectParameters>
        </asp:SqlDataSource></td><td>
            <asp:GridView ID="GridView3"  DataSourceID="SqlDataSource3" runat="server" 
                AutoGenerateColumns="False" RowStyle-CssClass="PriceList">
                <Columns>
                    <asp:BoundField DataField="TicketType" HeaderText="TicketType" 
                        SortExpression="TicketType" />
                    <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                
                SelectCommand="SELECT TicketType, Price FROM TicketPrices WHERE (type = @type) AND (cinema = @Cinema)">
                <SelectParameters>
                    <asp:Parameter DefaultValue="Special" Name="type" Type="String" />
                    <asp:ControlParameter ControlID="DropDownList2" DefaultValue="" Name="Cinema" 
                        PropertyName="SelectedValue" Type="Decimal" />
                </SelectParameters>
            </asp:SqlDataSource>     
            
        </td></tr>
        </table>
        </ContentTemplate>  
          </asp:UpdatePanel>
          </asp:ScriptManager>
</td></tr>

</table>	
<table width="100" cellpadding="15" ><tr><td>Copyright@2012 MovieTix</td><td><asp:HyperLink ID="HyperLink8"  CssClass="footer" NavigateUrl="~/Default.aspx" runat="server">Homepage</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink9"  CssClass="footer" NavigateUrl="~/Session.aspx" runat="server">Session</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink10"  CssClass="footer" NavigateUrl="~/Movie.aspx" runat="server">Movies</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink12"  CssClass="footer" NavigateUrl="~/register.aspx" runat="server">Register</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink13"  CssClass="footer" NavigateUrl="~/Login.aspx" runat="server">Log In</asp:HyperLink></td></tr></table>
    </form>
  
</body>
</html>
